import json

# 使用json包解析json数据
student_json = '{"age":22,"clazz":"文科六班","gender":"女","id":"1500100001","name":"施笑槐"}'

# 解析json数据,转换成python的对象
student_obj = json.loads(student_json)

print(type(student_obj))
print(student_obj)
print(student_obj["name"])
print(student_obj["age"])

info = {"age": 11, "clazz": "文科六班", "gender": "男", "id": "1500100001", "name": "施笑槐"}
print(info)

# 将python的对象转换成json字符串
print(json.dumps(info, ensure_ascii=False))
